$(document).ready(function(){
    $(".submitData").click(function(){ 
        var uExperId = $(this).attr('rel');
        connect.uExId = uExperId;
        connect.startCall();
   });
   $(".reCallUser").click(function(){
        var uId = $(this).attr('rel');
        connect.uId = uId;
        connect.confirmCall(1);
   });
   $(".peding-call-cancel").livequery('click',function(){
        connect.hiddenResponse();
   });
   $(".pending-call-ok").livequery('click',function(){
        var uExperId = $(".uId").val();
        connect.uExId = uExperId;
        connect.savePendingCall();
   });
   $(".cofirm-call-cancel").livequery('click',function(){
        var uid = $(".uid").val();
        connect.uId = uid;
        connect.confirmCall(0);
   });
   $(".cofirm-call-ok").livequery('click',function(){
        var uid = $(".uid").val();
        connect.uId = uid;
        connect.confirmCall(1);
   });
   $(".cofirm-money-cancel").livequery('click',function(){
        var uExpert = $(".uId").val();
        connect.uExId = uExpert;
        connect.backCall();
        connect.hiddenResponse();
   });
   $(".cofirm-money-ok").livequery('click',function(){
        var uExpert = $(".uId").val();
        connect.uExId = uExpert;
        var typePayment = $(".typePayment").val();
        if(!typePayment){
            alert('Vui lòng chọn hình thức thanh toán!');
            return false;
        }
        connect.getPayment(typePayment);
        connect.hiddenResponse();
   });
   $(".close_call").livequery('click',function(){
        var userId = $(".userId").val();
        var uidCall = $(".uidCall").val();// user thuc hien call
        var transactionId = $(".transactionId").val();// user thuc hien call
        var typePayment = $(".typePayment").val();// typePayment
        connect.closeCall(userId,uidCall,0,transactionId,typePayment);
   });
});